/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dw2;


import java.applet.*;

 /*
 * @author Administrator
 */

public class ComboManager {
    private Worm player;
    private Main parent;
    public AudioClip comboSound;
    public AudioClip firstBlood;
    public AudioClip doubleKill;
    public AudioClip dominating;
    public AudioClip rampage;
    public AudioClip excellentSound;
    public String comboText  = "";

    public ComboManager(Worm player) {
        this.player = player;
        excellentSound = player.parent.getAudioClip( player.parent.getDocumentBase(), "../Sounds/excellentMK.wav" );
        firstBlood = player.parent.getAudioClip( player.parent.getDocumentBase(), "../Sounds/firstbloodUT.wav" );
        doubleKill = player.parent.getAudioClip( player.parent.getDocumentBase(), "../Sounds/doublekillUT.wav" );
        rampage = player.parent.getAudioClip( player.parent.getDocumentBase(), "../Sounds/rampageUT.wav" );
        dominating = player.parent.getAudioClip( player.parent.getDocumentBase(), "../Sounds/dominatingUT.wav" );
    }
    public String getComboText() {
        return comboText;
    }
    public void run(int comboCount) {
        player.showComboText = true;
        if(comboCount == 1) {
            comboSound = firstBlood;
            comboText = "First blood!";
        }
        if(comboCount == 2) {
            comboSound = doubleKill;
            comboText = "Double kill!";
        }
        if(comboCount == 3) {
            comboSound = dominating;
            comboText = "Dominating!";
        }
        if(comboCount == 4) {
            comboSound = rampage;
            comboText = "Rampage!";
        }
        if(comboCount == 5) {
            comboSound = excellentSound;
        }
        
        comboSound.play();
    }
}
